def format_element(bfo):
	"""
	Displays clickable link to original record
	"""
	link = bfo.field("85640u")
	res = ""
	print link
	if link:
		res = "<a href='{0}' target='_blank'>{1}</a>".format(link.replace("&amp;", "&"), link)
	return res

def escape_values(bfo):
	"""
	Called by BibFormat in order to check if output of this element
	should be escaped.
	"""
	return 0
	
if __name__ == "__main__":
	from invenio.bibformat_engine import BibFormatObject as BFO
	print format(BFO(77893))
